<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<script>
	jQuery(document).ready(function() {
		jQuery("#newparametreService-creation_form").validationEngine();
	});
</script>
<h2>List des parametres:</h2>
<table class="adminlist" cellpadding="1">
	<thead>
		<tr>
			<th width="2%" class="title">#</th>
			<th class="title">Nom</th>
			<th  class="title">Type</th>
			<th class="title">Desc.</th>
			<th class="title" nowrap="nowrap">Supp.</th>
			
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${parametreServiceList}" var="ps">
			<tr class="row0">
				<td align="center">${ps.id}</td>
				<td align="center">${ps.nom}</td>
				<td align="center">${ps.type}</td>
				<td align="center">${ps.description}</td>
				<sec:authorize ifAnyGranted="SUPER_ADMIN,ADMIN">
				<td align="center"><a href="deleteparametreservice?ids=${id}&idp=${ps.id}"  onclick="return confirm('Etes-vous sure de supprimer ce parametre ?');"><img src='<c:url value="/images/icon_delete.gif"></c:url>'/></a></td>
				</sec:authorize>
			</tr>
		</c:forEach>
	</tbody>
</table>
<h2>Nouveau parametre:</h2>
<form:form action="newparametreService" method="post" id="newparametreService-creation_form"
	modelAttribute="parametreService">
	<fieldset>
		<legend>
			<img src='<c:url value="/images/services.jpg"/>'>
		</legend>
		<label>Nom : </label>
		<form:input type="text" size="33" path="nom" value=""
			class="validate[required,custom[onlyLetterSp]]" />
		<label>Type : </label>
		<select name="type" class="validate[required]">
			<option value="int">Entier</option>
			<option value="Date">Date</option>
		</select>
		<input type="hidden" value="${id}" name="id"/>
		<br> <br> <input type="submit" value="Ajouter" />


	</fieldset>
</form:form>